package com.example.nginxdemo.controller;

public class R<T>{
    private Integer code;
    private String msg;
    private T data;
    private T extra;

    public Integer getCode() {
        return code;
    }

    public R<T> setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public R<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public R<T> setData(T data) {
        this.data = data;
        return this;
    }

    public T getExtra() {
        return extra;
    }

    public R<T> setExtra(T extra) {
        this.extra = extra;
        return this;
    }

    public R() {
    }

    public R(T data) {
        this.data = data;
    }

    public R(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public R(Integer code, String msg, T data, T extra) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.extra = extra;
    }


}
